﻿using Core.Domain.Companys;
using System.Data.Entity.ModelConfiguration;

namespace Data.Mapping.Companys
{
    public partial class JobsMap : EntityTypeConfiguration<Jobs>
    {
        public JobsMap()
        {
            this.ToTable("Jobs");
            this.HasKey(s => s.Id);
            this.Property(s => s.Name).IsRequired().HasMaxLength(200);
            this.Property(s => s.Memo).IsRequired().IsMaxLength();


            this.Ignore(p => p.JobWorkType);

            this.HasMany(c => c.JobAttribute)
                .WithMany()
                .Map(m => m.ToTable("Jobs_Attribute_Mapping"));

        }
    }
}
